<?php $this->load->view('header', $head); ?>

<div data-role="page" id="create-location">
	<div data-role="header">
		<h1>새 위치 생성</h1>
	</div><!-- /header -->

	<div data-role="content">	
		<?=form_open('ajax/create_location', array('class'=>'ajax-form'))?>
		<input type="hidden" name="lat" id="lat" />
		<input type="hidden" name="lng" id="lng" />
			<ul data-role="listview">
				<li data-role="fieldcontain">
					<fieldset data-role="controlgroup" class="address-selector">
						<legend class="field-label">위치</legend>
						<label for="address1">도/시</label>
						<?=form_dropdown('address_id[]', $address[0], set_value('address_id[0]'), 'id="address1"')?>
						<label for="address2">시/군/구</label>
						<?=form_dropdown('address_id[]', $address[1], set_value('address_id[1]'), 'id="address2"')?>	
						<label for="address3">동/읍/면</label>
						<?=form_dropdown('address_id[]', $address[2], set_value('address_id[2]'), 'id="address3"')?>
					</fieldset>
				</li>
				
				<li id="map-canvas" style="height:180px;"></li>
				<li data-role="fieldcontain">
					<label for="address">주소: </label>
					<input type="text" id="address" name="address"/>
					<label for="name">이름</label>
					<input type="text" name="name" id="name"/>
					<label for="radius">반경(미터): </label>
					<input type="range" id="radius" name="radius" value="500" min="10" max="3000"/>
					
				</li>
				<li>
					<div class="ui-grid-a">
						<div class="ui-block-a">
							<a data-role="button" data-rel="back"/>취소</a>
						</div>
						<div class="ui-block-b">
							<input type="submit" data-theme="b" value="등록"></a>
						</div>
					</div>
				</li>
			</ul>
		<?=form_close()?>
	</div><!-- /content -->
</div>

<?php $this->load->view('footer'); ?>
